{% from '@SyliusAdmin/Macro/translationForm.html.twig' import translationForm %}

<div class="ui active tab" data-tab="details">
    <h3 class="ui dividing header">{{ 'sylius.ui.details'|trans }}</h3>

    <div class="ui segments">
        {{ translationForm(form.translations) }}
        <div class="ui hidden divider"></div>
        <div class="ui segment">
            {{ form_row(form.code) }}
            <div class="two fields">
                {{ form_row(form.shippingCategory) }}
            </div>
            {{ form_row(form.channelPricings) }}
        </div>
        <div class="ui segment">
            <div class="one field">
                {{ form_row(form.shippingRequired) }}
            </div>
        </div>
        {% if form.optionValues is defined and form.optionValues|length > 0 %}
        <div class="ui hidden divider"></div>
        <div class="ui segment">
            <h4 class="ui dividing header">{{ 'sylius.ui.options'|trans }}</h4>
            {% for option_form in form.optionValues %}
                {{ form_row(option_form) }}
            {% endfor %}
        </div>
        {% endif %}
        <div class="ui hidden divider"></div>
        <div class="ui segment">
            <h4 class="ui dividing header">{{ 'sylius.ui.properties'|trans }}</h4>
            {{ form_row(form.height) }}
            {{ form_row(form.width) }}
            {{ form_row(form.depth) }}
            {{ form_row(form.weight) }}
        </div>
        <div class="ui hidden divider"></div>
        <div class="ui segment">
            <h4 class="ui dividing header">{{ 'sylius.ui.inventory'|trans }}</h4>
            {{ form_row(form.onHand) }}
            {{ form_row(form.tracked) }}
            {{ form_row(form.version) }}
        </div>
    </div>

    {{ sonata_block_render_event('sylius.admin.product_variant.' ~ action ~ '.tab_details', {'form': form}) }}
</div>
